<!DOCTYPE html>
<html lang="en" xmlns:v-on="http://www.w3.org/1999/xhtml">
<head>
    <meta charset="UTF-8">
    <title>循环</title>
</head>
<body>
    <div id="app">
       <ul>
<!--           名字随意，位置固定，至少一个参数，表示当前循环的对象，第二个参数表示当前的下标-->
           <li v-for="(user,index) in users" :key="index">
              {{index}}--- {{user.id}}--{{user.name}}---{{user.age}}
           </li>
       </ul>
    </div>
    <script src="./node_modules/vue/dist/vue.js"></script>
    <script>
        var app = new Vue({
            el:"#app",
            data:{
                users:[
                    {
                        id:10081,
                        name:"ldh01",
                        age:51
                    },
                    {
                        id:10082,
                        name:"ldh02",
                        age:52
                    },
                    {
                        id:10083,
                        name:"ldh03",
                        age:53
                    }
                ]
            }

        });
    </script>


</body>
</html>